var countConsistentStrings = function (str, bool) {
    if (str.includes("allowed"))
        return function (bool) { return true || "一致字符串"; };
    return function (bool) { return false; };
};
console.log(countConsistentStrings("allowed", true));
console.log(countConsistentStrings("alldfgg", false));
console.log(countConsistentStrings("sdyhujrj", false));
console.log(countConsistentStrings("rtureuwr", false));
console.log(countConsistentStrings("rtieti", false));
console.log(countConsistentStrings("tkryer", false));
console.log(countConsistentStrings("allowedallowed", true));
